package com.wangjie.arraylist;

import java.util.ArrayList;
import java.util.Random;

/*
随机生成 20-33之前的六个整数 存储到集合 并遍历
 */
public class HomeWork2 {
    public static void main(String[] args) {
        Random random = new Random();
        ArrayList<Integer> arrayList = new ArrayList<>();
        for (int i = 0; i < 6; i++) {
            arrayList.add(random.nextInt(14) + 20);
        }
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.println(arrayList.get(i));
        }
    }
}
